home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 77 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1009 b 

  1. Path: stdc.demon.co.uk!clive
  2. From: clive@stdc.demon.co.uk (Clive D.W. Feather)
  3. Newsgroups: comp.std.c
  4. Subject: Re: int's and zero
  5. Date: Thu, 11 Jan 1996 00:03:42 GMT
  6. Organization: Demon Internet Limited (personal account)
  7. Message-ID: <DKzpI8.8Kx@stdc.demon.co.uk>
  8. References: <4cth4e$4q@odin.funcom.no> <4cub1a$jbl@alterdial.UU.NET> <4d12qv$fir@natasha.rmii.com>
  9. Reply-To: clive@demon.net
  10. X-NNTP-Posting-Host: stdc.demon.co.uk
  11.  
  12. In article <4d12qv$fir@natasha.rmii.com>,
  13. Jerry Coffin <jcoffin@rmii.com> wrote:
  14. > Yes -- in one's complement, `-0' is represented with all bits set to 1.
  15. > With one's complement, the usual method of testing for 0 is something
  16. > like: `if (x+0 == 0)' since the addition of 0 normally produces a
  17. > positive 0.
  18.  
  19. The C Standard requires +0 and -0 to compare equal to each other.
  20.  
  21. -- 
  22. Clive D.W. Feather                       | If you lie to the compiler,
  23. clive@demon.net        (work, preferred) | it will get its revenge.
  24. clive@stdc.demon.co.uk (home)            |   - Henry Spencer
  25.